<?php

namespace app\demo\validate;
use think\Validate;
class Tags extends Validate
{
    //定义验证规则
    protected $rule = [
        'name|名称' => 'require|max:20|unique:xdk_tags',


    ];

    //定义验证提示
    protected $message = [
        'name.regex' => '行为标识由字母和下划线组成',
    ];
}
